package com.zito.health.controller;

import com.zito.health.common.annotations.ResponseResult;
import com.zito.health.common.result.VerifyResult;
import com.zito.health.entity.User;
import com.zito.health.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: gxt
 * @time: 2019/11/8 9:47
 */
@Slf4j
@ResponseResult
@RestController
@RequestMapping("/register")
public class RegisterController {

    @Autowired
    private UserService userService;

    /**
     *
     * @return
     */
    @PostMapping("/personnelRegister")
    public VerifyResult person(User user){
        VerifyResult verifyResult = new VerifyResult();
        userService.save(user);
        return verifyResult;
    }

    @PostMapping("/orgRegister")
    public String orgRegister(){

        return null;
    }
}
